1. Field of the Invention
The present invention relates to data processing used for example in full-color printing related equipment, such as printers, video printers, scanners, or the like, or image processing equipment such as those for generating computer-graphics images, or display devices such as monitors, and in particular to an image processing device and method for image-processing the image data represented by three colors of red, green and blue, to be suitable for the equipment used.
2. Description of Related Art
Color conversion in printing is an essential image technology for compensating for deterioration of printed images, due to color-mixing property caused by the fact that inks are not of pure colors, and due to non-linearity of the image printing, and outputting printed images with a good color reproducibility. In display devices, such as monitors, color conversion is effected for outputting (displaying) an image with a desired color reproduction characteristics suitable for the conditions in which the device is used, in displaying the input color data.
The color conversion can be realized by a table conversion method or a matrix calculation method.
A representative example of table conversion method is a three-dimensional look-up table method, in which image data represented by red, green and blue (hereinafter referred to as “R, G, B”) are input, and image data of R, G, B, or complementary color data of yellow, magenta and cyan (hereinafter referred to as “Y, M and C”) stored in advance in a memory, such as a ROM are output. This method permits use of any desired conversion characteristics so that color conversion with a good color reproducibility can be achieved.
A problem associated with the table conversion method is the size of the memory required. In a simple configuration in which, for each combination of the input image data, data to be output is stored, a memory with a capacity of about 400 Mbits is needed. For instance, Japanese Patent Kokai Publication No. S63-227181 discloses a method of compressing the memory capacity, but the required capacity is still about 5 Mbits. Thus, this method requires a memory of a large capacity for each conversion characteristics, and it is difficult to implement the method by means of LSIs. Another problem is that the method cannot be flexibly adapted to changes in the use conditions or the like.
In the matrix calculation method, the following equation (1) is a basic calculation equation used for converting certain image data Ri, Gi, Bi to another image data Ro, Go, Bo.
                              [                                                    Ro                                                                    Go                                                                    Bo                                              ]                =                              (            Aij            )                    ⁡                      [                                                            Ri                                                                              Gi                                                                              Bi                                                      ]                                              (        1        )            
In the equation (1), i=1 to 3, j=1 to 3.
Here, the desired color reproduction may be an “exact color reproduction” or a “preferred color reproduction.” The “exact color reproduction” is an exact or faithful color reproduction that is as close as possible to the original image. To realize the exact color reproduction, it is contemplated to perform color reproduction using a standard color space, such as NTSC or sRGB. On the other hand, a “preferred color reproduction” is a color reproduction that is preferred by a human being, taking account of the characteristics of the human visual perception, and memory colors, and is not necessarily identical with the “exact color reproduction.” In a color reproduction used for display of moving pictures, such as those of television pictures, a “preferred color reproduction” is often performed. In the memory colors of human beings, there is a tendency that the color of the sky, and the green color of the grass are memorized as colors which are brighter, of a higher chroma. Accordingly, for realizing a “preferred color reproduction,” a color conversion to increase the chroma of the colors is often applied to the input color data. Moreover, even in the “exact color reproduction,” it is not rare that a color conversion to increase the chroma of the colors is applied to the input color data.
Also, the color data input to an image display device are not necessarily identical with the original color data generated at a color data source, such as a camera. This is because the various noises are applied in the process of transmission of the color data. Further consideration is given on a case where the original color generated by a camera are transmitted over a transmission path, and input to an image display device. Let us assume that the original color data output from the camera are denoted by Rs, Gs, Bs, respectively representing red, green and blue, and the color data input to the image display device are denoted by Ri, Gi, Bi. If there are no effects of noises over the transmission path, and the procedures for transmission and reception are conducted accurately, then the following relationship should be satisfied.Rs=Ri, Gs=Gi, Bs=BiIn reality, it is considered that there is an effect of noises in the transmission path. Moreover, it is also conceived that some errors may occur in the procedures at the time of transmission and reception. If the noise components which are the effects of noises or the effects on the color data due to the errors in the procedures of transmission and reception are denoted by Rn, Gn, and Bn, the color data Ri, Gi, and Bi input to the image display device are given by:Ri=Rs+Rn,Gi=Gs+Gn,Bi=Bs+Bn.That is, the color data Ri, Gi, and Bi input to the image display device are the respective sums of the original data components Rs, Gs, and Bs, and the noise components Rn, Gn, and Bn.
Let us consider a situation where color conversion to increase the chroma of the colors is applied to Ri, Gi, Bi input to the image display device to realize a “preferred color reproduction.” When conversion to increase the chroma of the color data represented by Ri, Gi, Bi is effected, not only the chroma of the original color data components Rs, Gs, Bs, but also the chroma of the noise components Rn Gn, Bn is increased. When the original color data components Rs, Gs, Bs are small, the effects of the noise components Rn, Gn, Bn are relatively large, and the chroma of the noise components Rn, Gn, Bn is increased by a larger amount. As a result, in dark parts of the image where the original color components Rs, Gs, Bs are small, the color conversion increases the effects of the noise or the effects of errors during transmission and reception. It is therefore necessary to take care not to increase the effects of noise or the effects of errors during transmission and reception, in performing color conversion of dark parts of the image where the original color data components Rs, Gs, Bs are small When the original color data Rs, Gs, Bs are small, the color data Ri, Gi, Bi input to the image display device are small, resulting in dark colors. It is therefore possible to estimate, from the features or characteristics, such as lightness of the color data Ri, Gi, Bi input to the image display device, that the effects of the noise components Rn, Gn, Bn will be relatively large.
However, the conventional color conversion method using the above equation (1), in which color conversion is effected without taking into consideration the characteristics, such as lightness of the color data Ri, Gi, Bi input to the image display device, is associated with the problem that the color conversion increases the effects of the noises or the effects of errors during transmission and reception, in the dark parts of the image where the original color data components Rs, Gs, Bs are small.
Let us assume that each of the color data representing red, green and blue are any integer of from 0 to 255. FIG. 20A to FIG. 20C show an example of the original color data components Rs, Gs, Bs, the noise components Rn, Gn, Bn, and the color data Ri, Gi, Bi input to the image display device, in a case where the noise components Rn, Gn, Bn are relatively small compared with the original color data components Rs, Gs, Bs. In FIG. 20A to FIG. 20C, the vertical axis represents the magnitudes of the signals. FIG. 20A shows an example of the original color data components Rs, Gs, Bs, with Rs=192, Gs=64, Bs=64. FIG. 20B shows an example of noise components Rn, Gn, Bn, with Rn=8, Gn=8, Bn=24. FIG. 20C shows the color data Ri, Gi, Bi input to the image display device, that are obtained from Rs, Gs, Bs shown in FIG. 20A and Rn, Gn, Bn shown in FIG. 20B, and Ri=200, Gi=72, Bi=88. The original color data components Rs, Gs, Bs shown in FIG. 20A represent a red color. The color data Ri, Gi, Bi shown in FIG. 20C and input to the image display device represent slightly bluish red, due to the effects of the noise components Rn, Gn, Bn.
FIG. 21A to FIG. 20C show an example of the original color data components Rs, Gs, Bs, the noise components Rn, Gn, Bn, and the color data Ri, Gi, Bi input to the image display device, in a case where the noise components Rn, Gn, Bn are relatively large compared with the original color data components Rs, Gs, Bs (the original color data components Rs, Gs, Bs are relatively small compared with the noise components Rn, Gn, Bn). In FIG. 21A to FIG. 21C, the vertical axis represents the magnitudes of the signals. FIG. 21A shows an example of the original color data components Rs, Gs, Bs, with Rs=24, Gs=8, Bs=8. FIG. 21B shows an example of noise components Rn, Gn, Bn, with Rn=8, Gn=8, Bn=24 (values identical to those in FIG. 20A to FIG. 20C). FIG. 21C shows the color data Ri, Gi, Bi input to the image display device, that are obtained from Rs, Gs, Bs shown in FIG. 21A and Rn, Gn, Bn shown in FIG. 21B, and Ri=32, Gi=16, Bi=32. The original color data component Rs, Gs, Bs shown in FIG. 21A represent a red color. The color data Ri, Gi, Bi shown in FIG. 21C and input to the image display device represent magenta, due to the effects of the noise components Rn, Gn, Bn, and there is thus a larger change in the hue.
It is seen from comparison between FIG. 20A to FIG. 20C and FIG. 21A to FIG. 21C, that the difference between the hue of the color represented by the original color data components Rs, Gs, Bs and the hue of the color represented by the color data Ri, Gi, Bi input to the image display device, caused by the noise components Rn, Gn, Bn is larger as the noise components Rn, Gn, Bn are larger than the original color data components Rs, Gs, Bs (the original color data components Rs, Gs, Bs are smaller than the noise components Rn, Gn, Bn). Accordingly, in dark parts of an image, where the original color data components Rs, Gs, Bs are small, there are larger effects of noise components Rn, Gn, Bn.
The image display device is provided with a color conversion circuit to convert the color of the input color data Ri, Gi, Bi. FIG. 22 is a block diagram showing an example of conventional color conversion circuit. In FIG. 22, reference numeral 1 denotes a color correction amount calculator, 2 denotes a color correction amount adder. Color data Ri, Gi, Bi are input to the color correction amount calculator 1. The color correction amount calculator 1 calculates color correction amounts R1, G1, B1 based on the color data Ri, Gi, Bi, and the calculated color correction amounts are output to the color correction amount adder 2. The color data Ri, Gi, Bi are also input to the color correction amount adder 2, and added to the color correction amounts R1, G1, B1 at the color correction amount adder 2, and second color data Ro, Go, Bo are thereby determined. The calculation at the color correction amount calculator 1 to produce the color correction amounts R1, G1, B1 is conducted without taking into consideration the characteristics such as lightness of the input color data Ri, Gi, Bi.
The color conversion circuit shown in FIG. 22 performs color conversion expressed by the following equation (2). The equation (2) can be obtained by transforming the equation (1) as follows. Accordingly, the color conversion circuit shown in FIG. 22 can be said to perform the color conversion of equation (1).
                              [                                                    Ro                                                                    Go                                                                    Bo                                              ]                =                                                            [                                                                            1                                                              0                                                              0                                                                                                  0                                                              1                                                              0                                                                                                  0                                                              0                                                              1                                                                      ]                            ⁡                              [                                                                            Ri                                                                                                  Gi                                                                                                  Bi                                                                      ]                                      +                                          (                                                      A                    ′                                    ⁢                  ij                                )                            ⁡                              [                                                                            Ri                                                                                                  Gi                                                                                                  Bi                                                                      ]                                              =                                    [                                                                    Ri                                                                                        Gi                                                                                        Bi                                                              ]                        +                                          (                                                      A                    ′                                    ⁢                  ij                                )                            ⁡                              [                                                                            Ri                                                                                                  Gi                                                                                                  Bi                                                                      ]                                                                        (        2        )            
In the equation (2), i=1 to 3, j=1 to 3.
At the same time, color correction amounts R1, G1, B1 are determined by the linear calculation of the following equation (3) in the color correction amount calculator 1.
                              [                                                    R1                                                                    G1                                                                    B1                                              ]                =                              (                                          A                ′                            ⁢              ij                        )                    ⁡                      [                                                            Ri                                                                              Gi                                                                              Bi                                                      ]                                              (        3        )            
Thus, in the conventional color conversion method, color conversion is effected without taking into consideration the features or characteristics such as lightness of the color data Ri, Gi, Bi input to the image display device. Accordingly, when a processing to increase the chroma of the color data, i.e., to enhance the colors, in the conventional color conversion, the colors are enhanced even when there are large effects of the noise components Rn, Gn, Bn. As a result, in the dark parts of the image, the effects of the noise components are further increased, and the images displayed on the image display device will become very unpleasant.
Conventional color conversion methods in which the characteristics of the color data Ri, Gi, Bi input to the image display device are not taken into consideration is also associated with a problem that color contraction in which fine differences in colors are lost in light colors by the color conversion may occur.
Further consideration is given to several numeral examples. It is assumed that the calculation at the color conversion circuit shown in FIG. 22 is made according to the above equation (2) using the coefficient matrix shown by the following equation (4).
                              (                                    A              ′                        ⁢            ij                    )                =                  [                                                    0.2                                                              -                  0.1                                                                              -                  0.1                                                                                                      -                  0.1                                                            0.2                                                              -                  0.1                                                                                                      -                  0.1                                                                              -                  0.1                                                            0.2                                              ]                                    (        4        )            
When color data with Ri=230, Gi=20, Bi=20 are input, if there is no restriction on the range of values Ro, Go, Bo can assume, their values should be given by Ro=272, Go=−1, Bo=−1. However, since the values of Ro, Go, Bo are of integer values within the range of 0 to 255, the actual values are given by Ro=255, Go=0, Bo=0.
When color data with Ri=240, Gi=15, Bi=15 are input, if there is no restriction on the range of values Ro, Go, Bo can assume, their values should be given by Ro=285, Go=−8, Bo=−8. However, since the values of Ro, Go, Bo are of integer values within the range of 0 to 255, the actual values are given by Ro=255, Go=0, Bo=0. Accordingly, the values of Ro, Go, Bo obtained when the color data with Ri=230, Gi=20, Bi=20 are input, and the values of Ro, Go, Bo obtained when the color data with Ri=240, Gi=15, Bi=15 are input are identical with each other. That is, color contraction occurs.
Moreover, when color conversion to increase the chroma of the colors is conducted in the conventional conversion method in which the characteristics of the color data input to the image display device are not taken into consideration, color contraction by which fine differences in colors are lost at colors of a high chroma may occur.
The chroma Sat of the color data R, G, B can be defined using the maximum value MAX(R, G, B) and the minimum value MIN(R, G, B) of R, G, B, by the following equation (5).Sat=(MAX(R,G,B)−MIN(R,G,B))/(R,G,B)  (5)
If each of R, G, B can assume any value of from 0 to 255, a monochromatic color of red is expressed by R=255, G=0, B=0, and chromaSat =1. White is expressed by R=255, G=255, B=255, and Sat=0. Increase in chroma Sat can be achieved by increase in the difference MAX(R, G, B)−MIN(R, G, B).
The chroma Sati of Ri, Gi, Bi input to the image display device is expressed by the following equation (6).Sati=(MAX(Ri,Gi,Bi)−MIN(Ri,Gi,Bi))/MAX(Ri,Gi,Bi)  (6)
The chroma Sato of the color data Ro, Go, Bo obtained by the color conversion is expressed by the following equation (7).Sato=(MAX(Ro,Go,Bo)−MIN(Ro,Go,Bo))/MAX(Ro,Go,Bo)  (7)
Increase in the chroma by the color conversion circuit shown in FIG. 22 can be achieved by using the values shown by the following equation (8) for the coefficient matrix in the equation (2).
                              (                                    A              ′                        ⁢            ij                    )                =                  [                                                    0.2                                                              -                  0.2                                                                              -                  0.2                                                                                                      -                  0.2                                                            0.2                                                              -                  0.2                                                                                                      -                  0.2                                                                              -                  0.2                                                            0.2                                              ]                                    (        8        )            
When the input is given by Ri=255, Gi=128, Bi=128, the output will be given by Ro=255, Go=77, Bo=77. Here the fractional part (digits to the right of the decimal point) has been rounded. The chroma Sati of the input color data Ri, Gi, Bi is about 0.5 according to the above equation (6), and the chroma Sato of the output color data Ro, Go, Bo is 0.7 according to the above equation (7). Thus, the chroma of the color data is increased by the color conversion.
Let us now consider a situation where color data given by Ri=255, Gi=26, Bi=26 are input. The chroma Sati of the color data is 0.9. If there is no restriction on the range of values Ro, Go, Bo can assume, their values should be given by Ro=296, Go=−25, Bo=−25. However, because Ro, Go, Bo are restricted to assume an integer within the range of 0 to 255, the actual values are given by Ro=255, Go=0, Bo=0.
Let us now consider a situation where color data given by Ri=255, Gi=51, Bi=51 are input. The chroma Sati of the color data Ri, Gi, Bi is 0.8. If there is no restriction on the range of values Ro, Go, Bo can assume, their values should be given by Ro=286, Go=0, Bo=0. However, because Ro, Go, Bo are restricted to assume an integer within the range of 0 to 255, the actual values are given by Ro=255, Go=0, Bo=0. The values of Ro, Go, Bo obtained when the color data with Ri=255, Gi=26, Bi=26 are input, and the values of Ro, Go, Bo obtained when the color data with Ri=255, Gi=51, Bi=51 are input are identical with each other. That is, color contraction occurs.
When the conventional color conversion device or color conversion method is implemented by the table conversion method using a memory such as a ROM, a memory of a large capacity is required, and the conversion characteristics cannot be flexibly changed. In the case of the matrix calculation method, if a processing to increase the chroma of the color data, the effects of the noise components in the dark parts of the image may be emphasized, or color contraction wherein the fine differences in colors in the parts of high chroma or in the light parts are lost may occur.